package xuhaijia.lanou3g.autohome.findcar.depreciate;
//                .-~~~~~~~~~-._       _.-~~~~~~~~~-.
//            __.'              ~.   .~              `.__
//          .'//                  \./                   \\`.
//        .'//            为什么坚持  想一想当初             \\`.
//      .'// .-~"""""""~~~~-._     |     _,-~~~~"""""""~-.  \\`.
//    .'//.-"                 `-.  |  .-'                 "-. \\`.
//  .'//______.============-..   \ | /   ..-============._______\\`.
//.'//____________________________\|/_____________________________\\`.
// 
//                             

import android.widget.LinearLayout;
import android.widget.ListView;

import xuhaijia.lanou3g.autohome.R;
import xuhaijia.lanou3g.autohome.base.BaseFragment;
import xuhaijia.lanou3g.autohome.base.NetTool;
import xuhaijia.lanou3g.autohome.base.URLValues;

/**
 * Created by 7 on 16/8/23.
 */
public class DepreciateFragment extends BaseFragment{

    private ListView depreciateLv;
    private LinearLayout brandLL;
    private LinearLayout priceLL;
    private LinearLayout levelLL;
    private LinearLayout orderLL;
    private LinearLayout cityLL;
    private DepreciateAdapter depreciateAdapter;

    @Override
    protected int setLayout() {
        return R.layout.fragment_depreciate;
    }

    @Override
    protected void initView() {
        brandLL = bindView(R.id.fragment_depreciate_brand);
        priceLL = bindView(R.id.fragment_depreciate_price);
        levelLL = bindView(R.id.fragment_depreciate_level);
        orderLL = bindView(R.id.fragment_depreciate_order);
        cityLL = bindView(R.id.fragment_depreciate_city);
        depreciateLv = bindView(R.id.fragment_depreciate_lv);
    }

    @Override
    protected void initData() {
        depreciateAdapter = new DepreciateAdapter(mContext);
        mNetTool.getNetData(URLValues.DEPRECIATE_URL, DepreciateBean.class, new NetTool.NetListener<DepreciateBean>() {
            @Override
            public void onSuccess(DepreciateBean depreciateBean) {
                depreciateAdapter.setDepreciateBean(depreciateBean);
                depreciateLv.setAdapter(depreciateAdapter);
            }

            @Override
            public void onError(String errorMsg) {

            }
        });
    }

    @Override
    public void load() {

    }

    @Override
    public void refresh() {

    }
}
